<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'MyJsp.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<!-- 项目前置 -->
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/iconfont.css">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/swiper.min.css">
<link rel="stylesheet" href="css/styles.css">
<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
<script src="js/bootstrap.min.js" charset="UTF-8"></script>
<script src="js/swiper.min.js" charset="UTF-8"></script>
<script src="js/global.js" charset="UTF-8"></script>
<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
<script src="js/login.js" charset="UTF-8"></script>
<!-- 项目前置 -->
<script>
	$(document).ready(function() {
		// 顶部banner轮播
		var banner_swiper = new Swiper('.banner-box', {
			autoplayDisableOnInteraction : false,
			pagination : '.banner-box .swiper-pagination',
			paginationClickable : true,
			autoplay : 5000,
		});
		// 新闻列表滚动
		var notice_swiper = new Swiper('.notice-box .swiper-container', {
			paginationClickable : true,
			mousewheelControl : true,
			direction : 'vertical',
			slidesPerView : 10,
			autoplay : 2e3,
		});
		// 楼层导航自动 active
		$.scrollFloor();
		// 页面下拉固定楼层导航
		$('.floor-nav').smartFloat();
		$('.to-top').toTop({
			position : false
		});
	});

	//无刷新退出登录
	function exitLogin() {
		$.ajax({
			url : "UserServlet?flag=exit",
			type : "post",
			data : {
			},
			dataType : "json",
			success : function(data) {
				alert(data);
			},
			error : function(d1, d2) {
				alert(d1.status + "--" + d2);
			}
		});
	}

	function ccollect(ccid, flag, index) {
		$.ajax({
			url : "docollectionServlet",
			type : "post",
			data : {
				ccid : ccid,
				flag : flag,
				index : index
			},
			success : function(data) {
				$('#collection_box').html(data);
			},
			error : function(d1, d2) {
				alert("小小故障");
			}
		});
	/* 	$.post("docollectionServlet",{ccid:ccid},function(data){
		  $('#collection_box').html(data);
		}) */
	}
	function typenvfunction(type) {
		$.ajax({
			url : "dowomenServlet",
			type : "post",
			data : {
				type : type
			},
			success : function(data) {
				$('#hot-box2').html(data);
			}
		});

	}
	function typefunction(type) { //type 1shang 2xia 3tao 
		$.ajax({
			url : "domenServlet",
			type : "post",
			data : {
				type : type
			},
			success : function(data) {
				$('#hot-box1').html(data);
			}
		});
	}
	function search() {
		var i = $('#ss').val();
		location = "CategoryServlet?flag=from&cate_key=" + i;
	}
</script>

<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<div class="tab-header">
		<div class="inner">
			<div class="pull-left">
				<div class="pull-left">
					欢迎来到: <span class="cr">天衣无缝旗舰店</span>
				</div>
			</div>

			<c:if test="${user==null}">
				<div class="pull-right">
					<a href="login.jsp"><span class="cr">登录</span></a> <a
						href="login.jsp?p=register">注册</a>
				</div>
			</c:if>
			<c:if test="${user!=null}">
				<div class="pull-right">
					用户：<span>${user.uname}</span> <a href="personal.jsp">个人中心</a>
				</div>
			</c:if>
		</div>
	</div>
	<!-- 搜索栏 -->
	<div class="top-search">
		<div class="inner">
			<a class="logo" href="toindexServlet"><img
				src="images/icons/logo.jpg" alt="XXX" class="cover"></a>
			<div class="search-box">
				<form class="input-group">
					<input placeholder="Ta们都在搜XXX" type="text" id="ss"> <span
						class="input-group-btn">
						<button type="button" onclick="search()">
							<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
						</button>
					</span>
				</form>
				<p class="help-block text-nowrap">
					<a href="CategoryServlet?flag=from&ctype=装&csex=男装">男装</a> <a
						href="CategoryServlet?flag=from&ctype=装&csex=女装">女装</a>
				</p>
			</div>
			<div class="cart-box">
				<a href="ShopCartServlet?flag=index" class="cart-but"> <i
					class="iconfont icon-shopcart cr fz16"></i> <c:if
						test="${user!=null}">
						<span id="shopcart1">购物车 ${shopnum} 件<span>
					</c:if> <c:if test="${user==null}">
						<span id="shopcart2">购物车 0 件<span>
					</c:if>
				</a>
			</div>
		</div>
	</div>
	<!-- 首页导航栏 -->
	<div class="top-nav bg3">
		<div class="nav-box inner">
			<div class="all-cat">
				<div class="title">
					<i class="iconfont icon-menu"></i> 全部分类
				</div>
				<div class="cat-list__box">
					<div class="cat-box">
						<div class="title">
							<i class="iconfont icon-skirt ce"></i> 女装
						</div>
						<ul class="cat-list clearfix">
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=下装&csex=女装'">下装</span></li>
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=上装&csex=女装'">上装</span></li>
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=套装&csex=女装'">裙装</span></li>
						</ul>
						<!-- <div class="cat-list__deploy">
							<div class="deploy-box">
								<div class="genre-box clearfix">
									<span class="title" onclick="location='CategoryServlet?ctype=下装&csex=女装'">下装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>

									</div>
								</div>
								<div class="genre-box clearfix">
									<span class="title">上装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>

									</div>
								</div>
								<div class="genre-box clearfix">
									<span class="title">裙装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>

									</div>
								</div>

							</div>
						</div> -->
					</div>
					<div class="cat-box">
						<div class="title">
							<i class="iconfont icon-fushi ce"></i> 男装
						</div>
						<ul class="cat-list clearfix">
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=下装&csex=男装'">下装</span></li>
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=上装&csex=男装'">上装</span></li>
							<li><span class="title"
								onclick="location='CategoryServlet?flag=from&ctype=套装&csex=男装'">套装</span></li>
						</ul>
						<!-- <div class="cat-list__deploy">
							<div class="deploy-box">
								<div class="genre-box clearfix">
									<span class="title">下装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>

									</div>
								</div>
								<div class="genre-box clearfix">
									<span class="title">上装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>

									</div>
								</div>
								<div class="genre-box clearfix">
									<span class="title">套装：</span>
									<div class="genre-list">
										<a href="category.jsp">牛仔裤</a>
									</div>
								</div>
							</div>
						</div> -->
					</div>
				</div>
			</div>
			<ul class="nva-list">
				<a href="toindexServlet"><li class="active">首页</li></a>
			</ul>
			<div class="user-info__box">
				<div class="login-box">
					<div class="avt-port">
						<img src="images/icons/default_avt.png" alt="欢迎来到XXX"
							class="cover b-r50">
					</div>
					<!-- 已登录 -->
					<c:if test="${ user!=null }">
						<div class="name c6">
							Hi~ <span class="cr">${user.uname}</span>
							<p>
								<a href="" onclick="exitLogin()">退出登录</a>
							</p>
						</div>
					</c:if>
					<c:if test="${user==null }">
						<div class="name c6">Hi~ 你好</div>
						<div class="point c6">
							<a href="login.jsp">点此登录</a>，发现更多精彩
						</div>
					</c:if>
				</div>

				<div class="tags">
					<div class="tag">
						<i class="iconfont icon-real fz16"></i> 品牌正品
					</div>
					<div class="tag">
						<i class="iconfont icon-credit fz16"></i> 信誉认证
					</div>
					<div class="tag">
						<i class="iconfont icon-speed fz16"></i> 当天发货
					</div>
					<div class="tag">
						<i class="iconfont icon-tick fz16"></i> 人工质检
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 顶部轮播 -->
	<div class="swiper-container banner-box">
		<div class="swiper-wrapper">
			<div class="swiper-slide">
				<a href="item_show.jsp"><img src="images/temp/banner_1.jpg"
					class="cover"></a>
			</div>
			<div class="swiper-slide">
				<a href="item_show.jsp"><img src="images/temp/banner_2.jpg"
					class="cover"></a>
			</div>
			<div class="swiper-slide">
				<a href="category.jsp"><img src="images/temp/banner_3.jpg"
					class="cover"></a>
			</div>
			<div class="swiper-slide">
				<a href="item_show.jsp"><img src="images/temp/banner_4.jpg"
					class="cover"></a>
			</div>
			<div class="swiper-slide">
				<a href="sale_page.jsp"><img src="images/temp/banner_5.jpg"
					class="cover"></a>
			</div>
		</div>
		<div class="swiper-pagination"></div>
	</div>
	<!-- 楼层内容 -->
	<div class="content inner" style="margin-bottom: 40px;"
		id="collection_box">
		<section class="scroll-floor floor-1 clearfix">
		<div class="pull-left">
			<div class="floor-title">
				<i class="iconfont icon-tuijian fz16"></i> 爆款推荐 <a
					href="javascript:;" class="more"><i class="iconfont icon-more"></i></a>
			</div>
			<div class="con-box">
				<a class="left-img hot-img" href="ToItemShowServlet?temp=one"> <img
					src="images/floor_1.jpg" alt="" class="cover">
				</a>
				<div class="right-box hot-box" id="hot-box">

					<c:forEach items="${BKList }" var="n" varStatus="i">
						<a href="javascript:;" class="floor-item">
							<div class="item-img hot-img">
								<img src="images/temp/${n.cimgurl}" alt=${n.cname
									}
									class="cover"
									onclick=" location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">
							</div>
							<div class="price clearfix">
								<span class="pull-left cr fz16"
									onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">￥${n.cprice}</span>
								<span class="pull-right c6"
									onclick="ccollect(${n.ccid},1,${i.index})">${bkcc[i.index]}</span>
							</div>
							<div class="name ep" title="${n.cname}"
								onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">${n.cname}</div>
						</a>
					</c:forEach>

				</div>
			</div>
		</div>
		<div class="pull-right">
			<div class="floor-title">
				<i class="iconfont icon-horn fz16"></i> 平台公告 <a href="javascript:;"
					class="more"><i class="iconfont icon-more"></i></a>
			</div>
			<div class="con-box">
				<div class="notice-box bgf5">
					<div class="swiper-container">
						<div class="swiper-wrapper">
							<a class="swiper-slide ep" href="udai_notice.jsp">【公告】XXX平台已上线，您还在等什么呢？是吧~</a>
						</div>
					</div>
				</div>
				<div class="buts-box bgf5">
					<div class="but-div">
						<a href="javascript:;"> <i class="but-icon"></i>
							<p>实惠专区</p>
						</a>
					</div>
					<div class="but-div">
						<a href="javascript:;"> <i class="but-icon"></i>
							<p>热卖专区</p>
						</a>
					</div>
					<div class="but-div">
						<a href="javascript:;"> <i class="but-icon"></i>
							<p>男装爆款</p>
						</a>
					</div>
					<div class="but-div">
						<a href="javascript:;"> <i class="but-icon"></i>
							<p>女装爆款</p>
						</a>
					</div>
				</div>
			</div>
		</div>
		</section>
		<section class="scroll-floor floor-2">
		<div class="floor-title">
			<i class="iconfont icon-skirt fz16"></i> 女装
			<div class="case-list fz0 pull-right">
				<a href="javascript:;" onclick="typenvfunction(-1)">全部</a> <a
					href="javascript:;" onclick="typenvfunction(1)">上装</a> <a
					href="javascript:;" onclick="typenvfunction(2)">下装</a> <a
					href="javascript:;" onclick="typenvfunction(3)">裙装</a> <a
					href="CategoryServlet?flag=index">更多</a>
			</div>
		</div>
		<div class="con-box">
			<a class="left-img hot-img" href=""> <img
				src="images/floor_2.jpg" alt="" class="cover">
			</a>
			<div class="right-box" id="hot-box2">
				<c:forEach items="${womenList}" var="n" varStatus="i">
					<a href="javascript:;" class="floor-item">
						<div class="item-img hot-img">
							<img src="images/temp/${n.cimgurl}" alt=${n.cname } class="cover"
								onclick=" location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">
						</div>
						<div class="price clearfix">
							<span class="pull-left cr fz16"
								onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">￥${n.cprice}</span>
							<span class="pull-right c6"
								onclick="ccollect(${n.ccid},2,${i.index})">${wocc[i.index]}</span>
						</div>
						<div class="name ep" title="${n.cname}"
							onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">${n.cname}</div>
					</a>
				</c:forEach>

			</div>
		</section>
		<section class="scroll-floor floor-3">
		<div class="floor-title">
			<i class="iconfont icon-fushi fz16"></i> 男装
			<div class="case-list fz0 pull-right">
				<a href="javascript:;" onclick="typefunction(-1)">全部</a> <a
					href="javascript:;" onclick="typefunction(1)">上装</a> <a
					href="javascript:;" onclick="typefunction(2)">下装</a> <a
					href="javascript:;" onclick="typefunction(3)">套装</a> <a
					href="CategoryServlet?flag=index">更多</a>
			</div>
		</div>
		<div class="con-box">
			<a class="left-img hot-img" href=""> <img
				src="images/floor_3.jpg" alt="" class="cover">
			</a>
			<div class="right-box" id="hot-box1">
				<c:forEach items="${menList}" var="n" varStatus="i">
					<a href="javascript:;" class="floor-item">
						<div class="item-img hot-img">
							<img src="images/temp/${n.cimgurl}" alt="${n.cname}"
								class="cover"
								onclick=" location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">
						</div>
						<div class="price clearfix">
							<span class="pull-left cr fz16"
								onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">￥${n.cprice}</span>
							<span class="pull-right c6"
								onclick="ccollect(${n.ccid},3,${i.index})">
								${cc[i.index]}</span>
						</div>
						<div class="name ep" title="${n.cname}"
							onclick="location='ToItemShowServlet?temp=one&ccid=${n.ccid}'">${n.cname}</div>


					</a>
				</c:forEach>
			</div>
		</div>
		</section>

	</div>
	<!-- 	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item"><a href="udai_welcome.jsp"
				class="r-item-hd"> <i class="iconfont icon-user"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">用户中心</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="udai_shopcart.jsp"
				class="r-item-hd"> <i class="iconfont icon-cart" data-badge="10"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">购物车</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="udai_collection.jsp"
				class="r-item-hd"> <i class="iconfont icon-aixin"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">我的收藏</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="QueryPhone.jsp"
				class="r-item-hd"> <i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">查询手机号</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="baidumap.jsp"
				class="r-item-hd"> <i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">百度地图</span>
					</div>
			</a></li>
			<li class="r-toolbar-item to-top"><i class="iconfont icon-top"></i>
				<div class="r-tip__box">
					<span class="r-tip-text">返回顶部</span>
				</div></li>
		</ul>
	</div>
	-->

	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item"><a href="personal.jsp"
				class="r-item-hd"> <i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">用户中心</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="ShopCartServlet?flag=index"
				class="r-item-hd"> <i class="iconfont icon-cart"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">购物车</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="user_collectionServlet"
				class="r-item-hd"> <i class="iconfont icon-aixin"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">我的收藏</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="QueryPhone.jsp"
				class="r-item-hd"> <i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">查询手机号</span>
					</div>
			</a></li>
			<li class="r-toolbar-item"><a href="baidumap.jsp"
				class="r-item-hd"> <i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box">
						<span class="r-tip-text">百度地图</span>
					</div>
			</a></li>
			<li class="r-toolbar-item to-top"><i class="iconfont icon-top"></i>
				<div class="r-tip__box">
					<span class="r-tip-text">返回顶部</span>
				</div></li>
		</ul>
		<script>
			$(document).ready(function() {
				$('.to-top').toTop({
					position : false
				})
			});
		</script>
	</div>
	<!-- 底部信息 -->
	<div class="footer">
		<div class="footer-tags">
			<div class="tags-box inner">
				<div class="tag-div">
					<img src="images/icons/footer_1.gif" alt="厂家直供">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_2.gif" alt="一件代发">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_3.gif" alt="美工活动支持">
				</div>
				<div class="tag-div">
					<img src="images/icons/footer_4.gif" alt="信誉认证">
				</div>
			</div>
		</div>
		<div class="footer-links inner">
			<dl>
				<dt>XXX</dt>
				<a href="temp_article/udai_article10.jsp"><dd>企业简介</dd></a>
				<a href="temp_article/udai_article12.jsp"><dd>隐私说明</dd></a>
			</dl>
			<dl>
				<dt>服务中心</dt>
				<a href="temp_article/udai_article2.jsp"><dd>配送服务</dd></a>
				<a href="temp_article/udai_article3.jsp"><dd>用户协议</dd></a>
				<a href="temp_article/udai_article4.jsp"><dd>常见问题</dd></a>
			</dl>
			<dl>
				<dt>新手上路</dt>
				<a href="temp_article/udai_article5.jsp"><dd>如何成为代理商</dd></a>
				<a href="temp_article/udai_article6.jsp"><dd>代销商上架教程</dd></a>
				<a href="temp_article/udai_article8.jsp"><dd>付款账户</dd></a>
			</dl>
		</div>
		<div class="copy-box clearfix">
			<ul class="copy-links">
				<a href="udai_about.jsp"><li>联系我们</li></a>
				<a href="temp_article/udai_article10.jsp"><li>企业简介</li></a>
			</ul>
			<!-- 版权 -->
			<p class="copyright">
				© 2005-2017 XXX 版权所有，并保留所有权利<br>
				ICP备案证书号：闽ICP备XXX号-2&nbsp;&nbsp;&nbsp;&nbsp;福建省宁德市XXX&nbsp;&nbsp;&nbsp;&nbsp;Tel:
				XXX&nbsp;&nbsp;&nbsp;&nbsp;E-mail: XXX@qq.com
			</p>
		</div>
	</div>
</body>
</html>
